﻿using FluentValidation;

namespace IdentityService.WebAPI.Controllers.Login.Request;
public record LoginByPhoneAndCodeRequest(string PhoneNum, string Code);
public class LoginByPhoneAndCodeRequestValidator : AbstractValidator<LoginByPhoneAndCodeRequest>
{
    public LoginByPhoneAndCodeRequestValidator()
    {
        RuleFor(e => e.PhoneNum)
            .NotNull().WithMessage("手机号码不能为空")
            .NotEmpty().WithMessage("手机号码不能为空");
        RuleFor(e => e.Code).NotNull().NotEmpty();
    }
}